1. Field of the Invention
The present invention relates to textured computer graphics applications and systems.
2. Related Art
Texture mapping is a well-known and commonly used technique for creating surface detail. During rendering, an image stored as a texture map is mapped to an object surface to provide surface detail. Each object surface is composed of or tesselated into geometric primitives, such as, polygons (e.g. triangles). The quality of the texture mapping depends upon the parameterization of an object. Discontinuties and boundaries in the parametrization can result in undesirable artifacts (including seaming) in the rendering of a texture mapped surface.
Texture painting applications and systems are now available which allow a user to add texture detail to a computer graphics object or scene by painting. See, e.g., Pat Hanrahan and Paul E. Haeberli, "Direct WYSIWYG Painting and Texturing on 3D Shapes," Computer Graphics (SIGGRAPH '90 Proceedings), pp. 215-223, (incorporated in its entirety herein by reference). Various types of texture painting systems include screen space painting, tangent space painting, parameter space painting, and texture space painting.
During texture painting, a user's paint strokes or brush stamps define a texture paint area on an object surface where a user wants texture detail to be added to an object surface. A texture map is created (or updated) to include the texture paint area defined by the user during texture painting. A textured object that includes the texture paint area is then rendered by performing a texture mapping operation using texture from the created texture map.
The quality of the rendered textured object depends upon the quality of the created texture map and upon the parameterization of an object surface in texture space. Aliasing artifacts are due to different discretizations involved in texture mapping, such as, the representation of a texture image by discrete texels stored in a texture memory. The image of a surface in texture space is only approximated by a set of mapped texels. Individual mapped boundary texels (that is the mapped texels at the end of a conventional raster scanline) generally lie partially inside and partially outside of an ideal object surface boundary. Also, individual unmapped boundary texels (that is unmapped texels at or near the end of a conventional raster scanline) generally lie partially inside and partially outside of an ideal object surface boundary.
As recognized by the inventor, artifacts are ultimately due to the influence of these so-called unmapped boundary texels. The value of unmapped boundary texels will influence a surface rendering. Moreover, conventional filtering methods which are often used to reduce artifacts can actually contribute to artifacts given the influence of unmapped boundary texels.
FIGS. 1A to 3B illustrate the artifacts problem encountered in a conventional screen space painting application. In screen space painting, a brush (which can be thought of a two-dimensional disk) is located in a plane between the user and the object model. Paint is projected down to the object geometry. FIG. 1A shows a square representing an object model in object space. As shown in FIG. 1B, a simple tessellation for the square in FIG. 1A consists of two triangles, which are parameterized non-contiguously in texture space. At this point, texture can be represented by a solid color, e.g. red.
In FIG. 2A, paint has been applied in a geometry view. That is, a paint stroke has been painted in screen space on a plane over the displayed square. The paint stroke shown in this example, however, has not been projected onto the parameterized triangles in texture space (FIG. 2B).
FIG. 3A shows the projection of the paint (that is the wavy line paint stroke) into texture space, and in particular, onto the two parameterized triangles in the texture map. A texture map region is updated to include the paint stroke as projected onto the two triangles (FIG. 3A).
Conventional texture mapping techniques are then used to map texture from the newly created texture map to a display object. FIG. 3B shows the resultant display of a square with texture applied for the paint stroke. During rendering, the texture map of FIG. 3A is used. In this example, the created texture map is very low resolution, 64.times.64 texels, to produce a highly aliased look. Texture, however, is missing at the boundaries of the geometry (i.e. along the edges of the paint stroke at triangle edges). Texture is also missing along the diagonal of the two triangles--a problem referred to herein as "seaming." Similar discontinuities and artifacts arise in other types of texture painting applications, e.g., tangent space painting, parameter space painting and texture space painting.
A method, system, and computer program product are needed which create and update texture maps to minimize or eliminate seaming artifacts. The influence of unmapped boundary texels in a texture map needs to be reduced. In particular, when creating or updating a texture map, mapped boundary texels need to be continuously extended. A texture updating application and system which creates and updates texture maps to minimize or eliminate seaming artifacts during texture painting and warping is especially needed.